<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:p="http://primefaces.org/ui">

<h:head>
	<div id="menuCliente">
		<ui:include src="/pagine_clienti/commonHeader.xhtml" />
	</div>
</h:head>
<h:body>

	<f:metadata>
        <f:viewParam name="id" value="#{friendBean.id}" />
    </f:metadata>
	<h:form>
		<p:panel header="Prenota ">
			<h:panelGrid columns="2" id="modGrid">
				
				
				<h:outputText value="Nome Pacchetto:" />
				<h:outputText value="#{friendBean.selectedPack.nome}" />

				<h:outputText value="Luogo:" />
				<h:outputText value="#{friendBean.selectedPack.luogo}" />

				<h:outputText value="Posti disponibili:" />
				<h:outputText value="#{friendBean.selectedPack.numeroPosti}" />

				<h:outputText value="Data Partenza:" />
				<h:outputText value="#{friendBean.selectedPack.dataPartenza}">
					<f:convertDateTime type = "date"/>
				</h:outputText>	

				<h:outputText value="Data Ritorno:" />
				<h:outputText value="#{friendBean.selectedPack.dataArrivo}" >
					<f:convertDateTime type = "date"/>
				</h:outputText>	


				<h:outputText value="Hotel" />
				<h:outputText
					value="#{hotelBean.getHotelId(friendBean.selectedPack.hotel).nome},
									 #{hotelBean.getHotelId(friendBean.selectedPack.hotel).prezzoSingolo} €" />


				<h:outputText value="Escursione" />
				<h:outputText
					value="#{escurBean.getResultId(friendBean.selectedPack.escursione).get(0).nome}, 
									 #{escurBean.getResultId(friendBean.selectedPack.escursione).get(0).prezzoSingolo} €" />

				<h:outputText value="Prezzo del pacchetto " />
				<h:outputText value="#{friendBean.selectedPack.prezzo} €" />


				<p:commandButton value="Prenota" action="#{friendBean.confermaPrenotaz()}"/>
				
			</h:panelGrid>
		</p:panel>
		</h:form>

</h:body>
</html>